<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'gamePlay.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

	<link rel="stylesheet" type="text/css" href="/newbingo/css/style.css">


  </head>
  
  <body>
  	<input type="button" value="新增"/>
  	<table>
  		<tr>
  			<td>玩法名称</td>
  			<td>所属游戏</td>
  			<td>玩法简介</td>
  			<td>脚本类型</td>
  			<td>操作</td>
  		</tr>
  		<s:iterator value="pager.data">
  			<tr>
  				<td><s:property value="name"/></td>
  				<td><s:property value="game.gamename"/></td>
  				<td><s:property value="playDesc"/></td>
  				<td><s:property value="scriptType"/></td>
  				<td>
  					<a href="/newbingo/test/GamePlay_findById.action?gamePlay.id=${id }">修改</a>&nbsp;&nbsp;
  					<a href="/newbingo/test/GamePlay_delete.action?gamePlay.id=${id }">删除</a>
  					</td>
  			</tr>
  		</s:iterator>
  	</table>
  	
    
    <s:if test="gamePlay!=null">
    <form action="/newbingo/GamePlay_update.action" method="post">
    	游戏ID<input name="gamePlay.game.gameno" value="${gamePlay.game.gameno }" readonly>
    	玩法名称：<input name="gamePlay.name" value="${gamePlay.name}"/>
    	<input name="gamePlay.scriptType">
    	<input type="submit" value="修改">
    </form>
    </s:if>
    <form action="/newbingo/test/GamePlay_create.action">
    	游戏ID<input name="gamePlay.game.gameno" value=""><br>
    	玩法名称：<input name="gamePlay.name"/><br>
    	脚本类型：<input name="gamePlay.scriptType"><br>
    	脚本：<input name="gamePlay.playScript"/>
    	<input type="submit" value="保存">
    </form>
  </body>
</html>
